#include "SplitToolCppJieba.h"
#include "Configuration.h"
#include "PageLibPreprocessor.h"
#include <iostream>
#include <chrono>
using namespace std;

//预处理网页库并生成倒排索引表
int main()
{
    auto start = chrono::steady_clock::now();

    Configuration *config = Configuration::getInstance("../conf/myconf.conf");
    SplitToolCppJieba splitTool(config);
    
    PageLibPreprocessor pro(config, splitTool);
    pro.doProcess();
    
    auto end = chrono::steady_clock::now();
    chrono::duration<double> duration_seconds = end - start;
    double seconds = duration_seconds.count();
    cout << "程序执行总时长：" << seconds << " 秒" << endl;

    return 0;
}
